package com.zhaoqi.hr.dto.request;

import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * 岗位申请请求DTO
 */
public class JobApplicationRequest {
    
    /**
     * 岗位ID
     */
    @NotNull(message = "岗位ID不能为空")
    private Long jobPostingId;
    
    /**
     * 申请说明
     */
    private String applicationNote;
    
    /**
     * 期望薪资
     */
    private String expectedSalary;
    
    /**
     * 个人优势
     */
    private String personalAdvantage;

    // Getter and Setter methods
    public Long getJobPostingId() {
        return jobPostingId;
    }

    public void setJobPostingId(Long jobPostingId) {
        this.jobPostingId = jobPostingId;
    }

    public String getApplicationNote() {
        return applicationNote;
    }

    public void setApplicationNote(String applicationNote) {
        this.applicationNote = applicationNote;
    }

    public String getExpectedSalary() {
        return expectedSalary;
    }

    public void setExpectedSalary(String expectedSalary) {
        this.expectedSalary = expectedSalary;
    }

    public String getPersonalAdvantage() {
        return personalAdvantage;
    }

    public void setPersonalAdvantage(String personalAdvantage) {
        this.personalAdvantage = personalAdvantage;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JobApplicationRequest that = (JobApplicationRequest) o;
        return Objects.equals(jobPostingId, that.jobPostingId) &&
                Objects.equals(applicationNote, that.applicationNote) &&
                Objects.equals(expectedSalary, that.expectedSalary) &&
                Objects.equals(personalAdvantage, that.personalAdvantage);
    }

    @Override
    public int hashCode() {
        return Objects.hash(jobPostingId, applicationNote, expectedSalary, personalAdvantage);
    }

    @Override
    public String toString() {
        return "JobApplicationRequest{" +
                "jobPostingId=" + jobPostingId +
                ", applicationNote='" + applicationNote + '\'' +
                ", expectedSalary='" + expectedSalary + '\'' +
                ", personalAdvantage='" + personalAdvantage + '\'' +
                '}';
    }
}
